package com.atwisdom.star.core.dao.service.modelClass.hier;

import com.atwisdom.star.core.dao.pojo.modelClass.hier.HierInstance;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author fushb
* @description 针对表【hier_instance】的数据库操作Service
* @createDate 2023-06-09 15:23:12
*/
public interface HierInstanceService extends IService<HierInstance> {

    /**
     * 根据model和className匹配hier数据
     * @param model
     * @param className
     * @return
     */
    List<HierInstance> queryByModelAndClassName(String model, String className);
    /**
     * 根据model和className匹配hier数据
     * @param model
     * @param classNameList
     * @return
     */
    List<HierInstance> queryByModelAndClassNameList(String model, List<String> classNameList);

    /**
     * 根据model和className删除hier数据
     * @param model
     * @param className
     * @return
     */
    boolean removeByModelAndClassName(String model, String className);

    /**
     * 根据model和className数组删除hier数据
     * @param model
     * @param classNameList
     * @return
     */
    boolean removeByModelAndClassNameList(String model, List<String> classNameList);

    /**
     * 根据linkMoel和linkClassName删除hier数据
     * @param linkModel
     * @param linkClassName
     * @return
     */
    boolean removeByLinkModelAndLinkClassName(String linkModel, String linkClassName);
    /**
     * 根据linkMoel和linkClassName数组删除hier数据
     * @param linkModel
     * @param linkClassNameList
     * @return
     */
    boolean removeByLinkModelAndLinkClassNameList(String linkModel, List<String> linkClassNameList);

    boolean removeByModelAndContainerIdList(String model, List<Long> containerIdList);

    boolean removeByModelAndContainerId(String model, Long containerId);

    /**
     * 根据linkModel和关联id的数组删除hier数据
     * @param linkIdList 关联id的数组信息
     * @return
     */
    boolean removeByLinkModelAndLinkIdList(String linkModel, List<Long> linkIdList);

    /**
     * 根据linkModel和关联id删除hier数据
     * @param linkId 关联id的信息
     * @return
     */
    boolean removeByLinkModelAndLinkId(String linkModel, Long linkId);

    boolean removeByParentId(String model, Long containerId, String parentNodeId);
}
